﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using KingOfCSharp.iHunter;
namespace KingOfCSharp.iHunter.UI
{
    public partial class FolderSelectingDialog : Form
    {
        LocalClient client;
        Guid selectedGuid;

        public Guid SelectedGuid
        {
            get { return selectedGuid; }
            set
            {
                this.folderTreeView1.SelectedFolderGuid = value;
            }
        }
        public FolderSelectingDialog(LocalClient client)
        {
            this.client = client;
            InitializeComponent();
            this.folderTreeView1.Client = client;
            
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.selectedGuid = folderTreeView1.SelectedFolderGuid;
            this.DialogResult = DialogResult.OK;
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            this.selectedGuid = Guid.Empty;
            this.DialogResult = DialogResult.Cancel;
        }

  
    }
}
